package demo6;

import demo5.Person;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.lang.annotation.Annotation;

public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("demo6");
        DBConnection dbConnection = context.getBean(DBConnection.class);
        System.out.println("d1:"+dbConnection);
        DBConnection dbConnection1 = context.getBean(DBConnection.class);
        System.out.println("d2:"+dbConnection1);
    }
}
